package wh.coach.reposity.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import wh.coach.domain.Project;

/**
 * @Author xhw
 * @Date 2023/10/27
 * @Version 1.0
 */

@Mapper
public interface ProjectMapper {
    void deleteById(Long id);

    int deleteByPath(String path);

    Project findByPath(String path);

    Project findById(Long id);

    List<Project> findChildrenById(Long parentId);

    List<Project> findChildrenByPath(@Param("path") String path);

    List<Project> findAll();

    List<Project> findSiblingsByPath(@Param("path") String path);

    Project findLastChild(@Param("path") String path);

    void insert(Project project);

    int update(Project project);
}
